<?php

require("../plain_config.php");	
 
 if(isset($_GET["utilizator"]))
 	$act = "utilizator";
	else
	$act = "email";
	
 if ($act == "utilizator")
 	{ 
	$utilizator = $_GET["utilizator"];
	$rez_user = mysql_num_rows(mysql_query("SELECT user FROM users WHERE user = '".$utilizator."'"));
	if ($rez_user == 0)
	   echo "1";
	  else
       echo "0";
	}
 else if ($act == "email")
 	{ 
	$email = $_GET["email"];
	$rez_email = mysql_num_rows(mysql_query("SELECT mail FROM users WHERE mail = '".$email."'"));
	if ($rez_email == 0)
	   echo "1";
	  else
       echo "0";
   }
   	
?>